package edu.cuit.svsp.mapper;

import edu.cuit.svsp.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    User findByAccount(String account);
    User findById(Integer account);

    List<User> findAll(String name);

    List<User> findByState(String state, String name);

    List<User> findByLevel(String level, String name);

    List<User> findByLevelAndState(String level, String state, String name);

    boolean lock(Integer id);

    boolean pass(Integer id);

    boolean updateLevel(Integer id, String level);

    boolean isPassword(int id, String s);

    boolean updatePassword(int id, String s);

    boolean updateAvatar(@Param("avatarUrl") String avatarUrl , @Param("id") int id);
}
